package com.bestcem.xm.ticket.entity.mongo;

import com.bestcem.xm.ticket.constant.ColumnConstant;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

/**
 * mongo 实体基类, collection 通用字段
 *
 * @author XiaoYunSong <ys.xiao@idiaoyan.com>
 * @version v1.0
 * @date 2021/5/8
 */
@ToString
@Getter
@Setter
public abstract class BaseEntity implements Serializable {
    private static final long serialVersionUID = 8603603434168439276L;

    private String id;

    /**
     * 数据记录标记
     */
    @JsonProperty(value = ColumnConstant.Base.RECORD_FLAG)
    private Integer recordFlag = 1;

    @JsonProperty(value = ColumnConstant.Base.CREATED_DT)
    private Date createdDate;

    @JsonProperty(value = ColumnConstant.Base.CREATED_ID)
    private String createdId;

    @JsonProperty(value = ColumnConstant.Base.UPDATED_DT)
    private Date updatedDate;

    @JsonProperty(value = ColumnConstant.Base.UPDATED_ID)
    private String updatedId;


}
